<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!-- content starts -->
<div>
	<ul class="breadcrumb">
		<li><a href="#">主页</a></li>
		<li><a href="#">菜单管理</a></li>
	</ul>
</div>

<!--  content here-->
<div class="box col-md-12">
	<div class="box-inner">
		<div data-original-title="" class="box-header well">
			<h2>
				<i class="glyphicon glyphicon-user"></i> 菜单列表</h2>

			<div class="box-icon">
			
				 <a class="btn btn-minimize btn-round btn-default" href="#"><i class="glyphicon glyphicon-chevron-up"></i> </a>
				  <a class="btn btn-close btn-round btn-default" href="#"><i	class="glyphicon glyphicon-remove"></i></a>
			</div>
		</div>
		<div class="box-content">
			<!-- <div class="alert alert-info">For help with such table please check <a target="_blank" href="http://datatables.net/">http://datatables.net/</a></div>  -->
			<div role="grid" class="dataTables_wrapper"
				id="DataTables_Table_0_wrapper">
				<div class="row">
					<!-- <div class="col-md-6">
						<div id="DataTables_Table_0_length" class="dataTables_length">
							<label>
							<select name="DataTables_Table_0_length" size="1" aria-controls="DataTables_Table_0">
								<option value="10" selected="selected">10</option>
									<option value="25">25</option>
									<option value="50">50</option>
									<option value="100">100</option></select> 条每页</label>
						</div>
					</div>
					<div class="col-md-6">
						<div class="dataTables_filter" id="DataTables_Table_0_filter">
							<label>搜索: <input type="text"
								aria-controls="DataTables_Table_0"></label>
						</div>
					</div> -->
				</div>
				<table
					class="table table-striped table-bordered bootstrap-datatable datatable responsive dataTable"
					id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
					<thead>
						<tr role="row">
							<th class="sorting_asc" role="columnheader" tabindex="0"
								aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
								style="width: 214px;" aria-sort="ascending"
								aria-label="Username: activate to sort column descending">名称</th>
							<th class="sorting" role="columnheader" tabindex="0"
								aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
								style="width: 180px;"
								aria-label="Date registered: activate to sort column ascending">url</th>
							<th class="sorting" role="columnheader" tabindex="0"
								aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
								style="width: 97px;"
								aria-label="Role: activate to sort column ascending">父菜单</th>
							<th class="sorting" role="columnheader" tabindex="0"
								aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
								style="width: 96px;"
								aria-label="Status: activate to sort column ascending">状态</th>
							<th class="sorting" role="columnheader" tabindex="0"
								aria-controls="DataTables_Table_0" rowspan="1" colspan="1"
								style="width: 393px;"
								aria-label="Actions: activate to sort column ascending">操作</th>
						</tr>

					</thead>

					<tbody role="alert" aria-live="polite" aria-relevant="all">
						<s:iterator   value="resourceList"  id="r" >
					    	<s:if test="#st.Even"> 
					    		<tr class="even">
					    	</s:if>
					    	<s:else>
							  <tr class="odd">
							</s:else>
							
							<td class=" sorting_1"><s:property value="#r.name"/></td>
							<td class="center "><s:property value="#r.url"/></td>
							<td class="center "><s:property value="#r.parentIds"/></td>
							<td class="center ">
								<s:if test="#r.status==0"> 
						    		<span class="label-default label label-danger">禁用</span>
						    	</s:if>
						    	<s:else>
								  <span class="label-default label label-success">启用</span>
								</s:else>
							</td>
							
							<td class="center ">
								<a href="#" class="btn btn-success">
									<i class="glyphicon glyphicon-zoom-in icon-white"></i> 查看
								</a> 
								<a href="#" class="btn btn-info"> 
									<i	class="glyphicon glyphicon-edit icon-white"></i> 编辑
								</a>
								
								<a onclick="ajaxContentConfirm('<%=basePath %>admin/indexResourceDel!indexResourceDel.action?resourceId=<s:property value="#r.ids"/>');" href="#" class="btn btn-danger"> 
									<i class="icon-trash icon-white"></i> 删除
								</a>
							</td>
						</tr>
					    </s:iterator>
					    
						
					</tbody>
				</table>
				<s:debug></s:debug>
			<!--	<div class="row">
				 	<div class="col-md-12">
						<div class="dataTables_info"  id="DataTables_Table_0_info">总共100条记录，显示1 至 10。</div>
					</div> 
					<div class="col-md-12 center-block">
						<div class="dataTables_paginate paging_bootstrap pagination">
							<ul class="pagination">
								<li class="prev disabled"><a href="#">← Previous</a></li>
								<li class="active"><a href="#">1</a></li>
								<li><a href="#">2</a></li>
								<li><a href="#">3</a></li>
								<li><a href="#">4</a></li>
								<li class="next"><a href="#">Next → </a></li>
							</ul>
						</div>
					</div>
				</div>
				-->
			</div>
		</div>
	</div>
</div>